<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value="打开新页面" id="btn">
</body>
<script>
    // var res = alert('这是弹出框')
   //  var res = confirm('这是选择框')
     //  var  res = prompt('这是输入框')
     //open
    //  var obtn = document.getElementById('btn')
    
    //  obtn.onclick = function(){
    //     open('https://blog.csdn.net/weixin_41636483/article/details/115082538?spm=1001.2014.3001.5502')
    //  }
    //    function fn(){
    //     if(confirm('充钱不')){
    //         fn()
    //     }
    //    }
    //    fu()


       function fun(){
        if(confirm('充钱不')){
            alert('感谢充钱')
        }else{
            fun()
        }
       }fun()

</script>
</html>